<template>
  <div class="page_root" :key="queryUpdateFlag" data-page-name="新建项目阶段审批详情" data-page-identification="t_0qmx2r0fpk">
    <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
      <!-- begin vid_5xyxirph4b 容器_ecypj7ok1l -->
      <al-box class="vid_5xyxirph4b">
        <!-- begin vid_sfegwgdw5r 容器_ufvsejezfy -->
        <al-box class="vid_sfegwgdw5r">
          <!-- begin vid_va9cmj0rns 新建项目阶段审批详情 -->
          <span class="vid_va9cmj0rns"> 新建项目阶段审批详情 </span>
          <!-- end vid_va9cmj0rns 新建项目阶段审批详情 -->
        </al-box>
        <!-- end vid_sfegwgdw5r 容器_ufvsejezfy -->
        <!-- begin vid_4mwddq8c9p 布局容器_wmujr3kztm -->
        <a-row class="vid_4mwddq8c9p" :gutter="16" :slots="'6:6:6:6'">
          <a-col :span="6">
            <!-- begin vid_jjfes5pdp5 项目阶段： -->
            <span class="vid_jjfes5pdp5"> 项目阶段： </span>
            <!-- end vid_jjfes5pdp5 项目阶段： -->
            <!-- begin vid_usmksu1eww 简单文本_xt4icyfse9 -->
            <span class="vid_usmksu1eww">
              {{ renderStringInTemplate(vid_usmksu1eww_props.rt_text) }}
            </span>
            <!-- end vid_usmksu1eww 简单文本_xt4icyfse9 -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_4stxrst2gr 所属项目： -->
            <span class="vid_4stxrst2gr"> 所属项目： </span>
            <!-- end vid_4stxrst2gr 所属项目： -->
            <!-- begin vid_sgrfvpzudv 简单文本_5jb01089lk -->
            <span class="vid_sgrfvpzudv">
              {{ renderStringInTemplate(vid_sgrfvpzudv_props.rt_text) }}
            </span>
            <!-- end vid_sgrfvpzudv 简单文本_5jb01089lk -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_cof7m7zcvf 关联cheklist： -->
            <span class="vid_cof7m7zcvf"> 关联cheklist： </span>
            <!-- end vid_cof7m7zcvf 关联cheklist： -->
            <!-- begin vid_q298z3sy9s 简单文本_p6kvx5e2ok -->
            <span class="vid_q298z3sy9s">
              {{ renderStringInTemplate(vid_q298z3sy9s_props.rt_text) }}
            </span>
            <!-- end vid_q298z3sy9s 简单文本_p6kvx5e2ok -->
          </a-col>
          <a-col :span="6">
            <!-- begin vid_ig2ov8t3mi 项目阶段预算： -->
            <span class="vid_ig2ov8t3mi"> 项目阶段预算： </span>
            <!-- end vid_ig2ov8t3mi 项目阶段预算： -->
            <!-- begin vid_3675u6hs2w 简单文本_qc3agwg2cf -->
            <span class="vid_3675u6hs2w">
              {{ renderStringInTemplate(vid_3675u6hs2w_props.rt_text) }}
            </span>
            <!-- end vid_3675u6hs2w 简单文本_qc3agwg2cf -->
          </a-col>
        </a-row>
        <!-- end vid_4mwddq8c9p 布局容器_wmujr3kztm -->
        <!-- begin vid_s8qpfbhtu7 布局容器_tpchvt0s97 -->
        <a-row class="vid_s8qpfbhtu7" :slots="'24'">
          <a-col :span="24">
            <!-- begin vid_jntk8rr4hv 备注： -->
            <span class="vid_jntk8rr4hv"> 备注： </span>
            <!-- end vid_jntk8rr4hv 备注： -->
            <!-- begin vid_lkc0nv33x6 容器_u6wbcp3dep -->
            <al-box class="vid_lkc0nv33x6">
              <!-- begin vid_kts6mwxesq 简单文本_ou0akzfin1 -->
              <span class="vid_kts6mwxesq">
                {{ renderStringInTemplate(vid_kts6mwxesq_props.rt_text) }}
              </span>
              <!-- end vid_kts6mwxesq 简单文本_ou0akzfin1 -->
            </al-box>
            <!-- end vid_lkc0nv33x6 容器_u6wbcp3dep -->
          </a-col>
        </a-row>
        <!-- end vid_s8qpfbhtu7 布局容器_tpchvt0s97 -->
        <!-- begin vid_7hzgi0iors 布局容器_v7wb8kfplj -->
        <a-row class="vid_7hzgi0iors" :slots="'24'">
          <a-col :span="24">
            <!-- begin vid_inx0qs4nkb 提交人： -->
            <span class="vid_inx0qs4nkb"> 提交人： </span>
            <!-- end vid_inx0qs4nkb 提交人： -->
            <!-- begin vid_6dc1sj23tj 提交人 -->
            <span class="vid_6dc1sj23tj">
              {{ renderStringInTemplate(vid_6dc1sj23tj_props.rt_text) }}
            </span>
            <!-- end vid_6dc1sj23tj 提交人 -->
          </a-col>
        </a-row>
        <!-- end vid_7hzgi0iors 布局容器_v7wb8kfplj -->
      </al-box>
      <!-- end vid_5xyxirph4b 容器_ecypj7ok1l -->
    </a-spin>
  </div>
</template>
<script setup lang="tsx">
  import {
      h, ref, reactive, toRaw, markRaw, watch, computed,
      onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, onActivated, onDeactivated
    } from "vue";
    import { useRoute, useRouter } from 'vue-router';
    const router = useRouter();
    const route = useRoute();
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios';
    import { cloneDeep, localGet, merge, getDifferenceArray, traversalTreeStructure, checkCaseCondition, renderStringInTemplate, handleBreadcrumbJump, throttle, permission, getComponentParamsValue } from '@/utils/index';
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is';
    import dayjs from 'dayjs';
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart';
    import { message, notification, Modal } from 'ant-design-vue'
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate, parseSubFromDataList } from '@/utils/format';
    import colorTheme from '@/design/custom-theme.json';
    
    import UserTableRecords from '@/model/UserTableRecords';
    import { getAppBaseUrl } from '@/utils/index';
    import { sendToken } from "@/hooks/useIframeToken";
    import { useSystemStore } from "@/store/modules/system";
    const systemStore = useSystemStore();
    



      // 获取传入的流程ID和组件参数
      const props = defineProps({
            'processInstanceId': {
            type: [String,Number,Boolean],
            default: undefined,
        },
      })
      const immediateWatch = (source, callback) => {
        watch(source, callback, {deep: true,immediate: true })
      }



  /* -------------------------- 属性定义 -------------------------- */

      const setTimeOutList = [];
      const pageLoading = reactive({
        loading: false,
        tip: undefined
      });
      const authInfo = localGet('app-user-store');

    const vid_usmksu1eww_props = reactive({
          rt_text: undefined,
  })

    const vid_sgrfvpzudv_props = reactive({
          rt_text: undefined,
  })

    const vid_q298z3sy9s_props = reactive({
          rt_text: undefined,
  })

    const vid_3675u6hs2w_props = reactive({
          rt_text: undefined,
  })

    const vid_kts6mwxesq_props = reactive({
          rt_text: undefined,
  })

    const vid_6dc1sj23tj_props = reactive({
          rt_text: undefined,
  })



      // 处理校验
      const setSubFormName =(parentInfo, name)=>{
        return [parentInfo.parents, parentInfo.cycleIndex, name];
      }


  /* ========================== 属性定义 ========================== */


  /* -------------------------- 元素数据引用 -------------------------- */


  /* ========================== 元素数据引用 ========================== */


  /* -------------------------- 页面数据 -------------------------- */

    // 页面数据 (交付)新增项目阶段审批详情
    const dataConnector_conn_yz8gfk1zct_response = ref();
    const dataConnector_conn_yz8gfk1zct = async (additionParams = {}) => {
        const exec = async () => {
          // 获取参数
          const params = {

          };

          // 注入附加的参数
          try {
            merge(params, additionParams);
          } catch (error) {
            console.log(error)
          }

          // 判断加载提示

          // 处理URL
          let url = '/solution-ppm/api/v2/built-in-system-ppm/changeRecord/project_phase/{instanceId}';
          // 替换url中的变量
          url = url.replace('{instanceId}', String(pageParameter_state.processInstanceId))
          // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
          Object.keys(params).forEach(key=>{ if(params[key] === null){ delete params[key] }else if( Object.prototype.toString.call(params[key]) === '[object Object]' ){ Object.keys(params[key]).forEach(childKey=>{ if(params[key][childKey] === null || (Array.isArray(params[key][childKey]) && params[key][childKey].length === 1 && isNullOrUnDef(params[key][childKey]?.[0]))){ delete params[key][childKey] }}) } });
          return get(url, params, {
                headers: undefined
              }).then(async (resp) => {
            dataConnector_conn_yz8gfk1zct_response.value = resp;

            return resp;
          }).catch(async (e) => {


            return Promise.reject(e);
          }).finally(async () => {


          })
        }

          return await exec()

    }


  /* ========================== 页面数据 ========================== */



  /* -------------------------- 响应 -------------------------- */

  /* ========================== 响应 ========================== */


  /* -------------------------- 函数 -------------------------- */

  /* ========================== 函数 ========================== */


  /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId,
    })

  /* ========================== 页面参数 ========================== */


  /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------
    // 处理 简单文本_xt4icyfse9 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.milepostName,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.milepostName

      vid_usmksu1eww_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 简单文本_5jb01089lk 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.projectName,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.projectName

      vid_sgrfvpzudv_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 简单文本_p6kvx5e2ok 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.projectPhaseName,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.projectPhaseName

      vid_q298z3sy9s_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 简单文本_qc3agwg2cf 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.milestoneBudget,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.milestoneBudget

      vid_3675u6hs2w_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 简单文本_ou0akzfin1 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.description,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.description

      vid_kts6mwxesq_props.rt_text = dataList;
    },
    {deep: true})
  // 处理 提交人 的 rt_text 属性关联
  watch(() => dataConnector_conn_yz8gfk1zct_response?.value?.data?.createdBy,
    () => {
      let dataList = dataConnector_conn_yz8gfk1zct_response?.value?.data?.createdBy

      vid_6dc1sj23tj_props.rt_text = dataList;
    },
    {deep: true})
    // ============================ 组件数据同步 ============================


  /* ========================== 组件事件处理方法 ========================== */


  /* -------------------------- 生命周期 -------------------------- */
  // 用于参数变更后重新执行自定义指令
      const queryUpdateFlag = ref(0);
      onMounted(() => { ;dataConnector_conn_yz8gfk1zct()

    });

    onUnmounted(() => {
      // 销毁定时器
      setTimeOutList.forEach(({ repeat, timer }) => {
        repeat ?  clearInterval(timer): clearTimeout(timer);
      });
    });

  /* ========================== 生命周期 ========================== */


  /* -------------------------- 数据关联处理 -------------------------- */





  /* -------------------------- 表单数据同步 -------------------------- */
  /* ========================== 表单数据同步 ========================== */

  /* ========================== 数据关联处理 ========================== */


  /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */

  /* ========================== 不同组件自定义的处理逻辑 ========================== */


  // ================================定制化逻辑========================================
</script>
<style lang="less" scoped>
  .page_root {
  width: 100%;
  height: 100%;
  overflow: auto;
  }
  .page_root :deep(.@{ant-prefix}-spin-nested-loading),
  .page_root :deep(.@{ant-prefix}-spin-container)
   {
      height: 100%;
  }
  .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper)
   {
      display: flex;
      flex-flow: column nowrap;
      justify-content: flex-start;
  }
  .page_root :deep(.@{ant-prefix}-table)
   {
    flex: auto;
    overflow: auto;
  }
  .table-moreBtn_down {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100px;
  }

  .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
    background: #ebf1ff;
  }

  /*  表格树结构样式处理，展开按钮层级增加*/
  :deep(.@{ant-prefix}-table-row-expand-icon) {
    z-index: 1;
  }
  /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
  :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 15px !important;
    width: calc(100% - 15px);
  }
  :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 30px !important;
    width: calc(100% - 30px);
  }
  :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 45px !important;
    width: calc(100% - 45px);
  }
  :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 60px !important;
    width: calc(100% - 60px);
  }

  /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
  :deep(.@{ant-prefix}-transfer-list)
   {
      height: 100%;
      width: 50%;
  }
  .vid_5xyxirph4b{
      height:750px;
      overflow-x:hidden;
      overflow-y:auto;
      display:block;
      background-color:#FFFFFF
  }
  .vid_sfegwgdw5r{
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      margin-bottom:16px;
      box-shadow:0px 0px 0px 0px
  }
  .vid_va9cmj0rns{
      padding-left:8px;
      font-weight:600;
      font-size:16px;
      line-height:16px;
      border-left-style:solid;
      border-left-width:4px;
      border-left-color:#3875FF
  }
  .vid_4mwddq8c9p{
      display:flex;
      flex-direction:row;
      align-items:flex-start;
      flex-wrap:undefined;
      margin-bottom:8px;
      box-shadow:0px 0px 0px 0px
  }
  .vid_jjfes5pdp5{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_usmksu1eww{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_4stxrst2gr{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_sgrfvpzudv{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_cof7m7zcvf{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_q298z3sy9s{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_ig2ov8t3mi{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_3675u6hs2w{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }
  .vid_s8qpfbhtu7{
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      margin-bottom:8px;
      box-shadow:0px 0px 0px 0px
  }
  .vid_jntk8rr4hv{
      min-width:42px;
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_lkc0nv33x6{
      box-shadow:0px 0px 0px 0px
  }
  .vid_kts6mwxesq{
      font-weight:600;
      color:rgba(38, 38, 38, 1);
      box-shadow:0px 0px 0px 0px
  }
  .vid_7hzgi0iors{
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      box-shadow:0px 0px 0px 0px
  }
  .vid_inx0qs4nkb{
      font-weight:400;
      color:rgba(89, 89, 89, 1)
  }
  .vid_6dc1sj23tj{
      font-weight:600;
      color:rgba(38, 38, 38, 1)
  }

  :deep(.@{ant-prefix}-table-empty .@{ant-prefix}-table-tbody tr > td) {
   padding: 0;
  }
</style>